# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=plasma-applet-weather-widget
pkgver=2.3.4
pkgrel=1
pkgdesc="Plasmoid for showing weather information from met.no and Open Weather Map servers"
# armhf blocked by qt5-qtdeclarative
arch="all !armhf"
url="https://github.com/blackadderkate/weather-widget-2"
license="GPL-2.0-only"
depends="
	qt5-qtxmlpatterns
	"
makedepends="
	extra-cmake-modules
	plasma-framework5-dev
	qt5-qtbase-dev
	samurai
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/blackadderkate/weather-widget-2/archive/refs/tags/v$pkgver.tar.gz"
subpackages="$pkgname-lang"
options="!check" # No tests
builddir="$srcdir/weather-widget-2-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
df6d5e50bfadf166d48b5ab3735e798b6fae217281d83e6555040b0826f0e68817985723ff50e28c91a9519e4d854a8062dd673134b75680bc7fd9ca4785fc78  plasma-applet-weather-widget-2.3.4.tar.gz
"
